import request from '@/utils/request'

export function databases() {
  return request({
    url: 'api/cdh/metadata/databases',
    method: 'get'
  })
}

export function tables(database) {
  return request({
    url: 'api/cdh/metadata/tables/' + database,
    method: 'get'
  })
}

export function columns(database, table) {
  return request({
    url: 'api/cdh/metadata/columns/' + database + '/' + table,
    method: 'get'
  })
}

export default {databases, tables, columns}
